# -*- coding: utf-8 -*-
from odoo import models, fields, api
from odoo.exceptions import ValidationError

class EmpLeavebatch(models.Model):
    _name = 'emp.leavebatch'

    peo_id = fields.Many2one(comodel_name='emp.peo')
    leave_batch_detail_ids = fields.One2many(comodel_name='emp.leavebatchdetail', inverse_name='leave_batch_id')

    pautono = fields.Char('人員電腦編號')
    year = fields.Char('年度')
    formno = fields.Char('請假單號')
    state = fields.Char('假單狀態')
    name = fields.Char('姓名')
    ptitle = fields.Char('職稱')
    dep = fields.Char('單位')
    code = fields.Char('請假人員工編號')
    type = fields.Char('假別')
    attach = fields.Char('假單附件別')
    reason = fields.Text('請假事由')
    vstart = fields.Char('請假起日')
    vend = fields.Char('請假迄日')
    vdays = fields.Char('請假天數')
    vhours = fields.Char('請假時數')
    created = fields.Char('建檔日期')
    remark = fields.Char('特殊說明')
    option1 = fields.Char('有無課')
    option2 = fields.Char('日間部課程')
    option3 = fields.Char('進修部課程')
    option4 = fields.Char('學生輔導時間')
    option5 = fields.Char('與亡者關係')
    option6 = fields.Char('死亡日期')
    option7 = fields.Char('附件其他說明')
    option8 = fields.Char('附件文號')
    option9 = fields.Char('懷孕月數')
    option10 = fields.Char('用掉補休時數')
    startweek = fields.Char('')
    endweek = fields.Char('')
    typeclass = fields.Char('')
    typecourse = fields.Char('')
    applyname = fields.Char('申請人')
    applyno = fields.Char('申請人員工編號')
    restart = fields.Char('')
    rend = fields.Char('')
    rdays = fields.Char('')
    rhours = fields.Char('')
    sess = fields.Char('學期')
    phome = fields.Char('電話')
    mobile = fields.Char('手機')
    agent = fields.Char('代理人姓名')
    jobkind = fields.Char('')
    datasource = fields.Char('')
    savesite = fields.Char('')
    sign_status = fields.Char('簽核狀態')
    status = fields.Char('表單狀態')
    agentpno = fields.Char('代理人員工編號')
    depno = fields.Char('請假人主要單位')
    depno2 = fields.Char('請假人第二單位')
    adminunit = fields.Char('主要單位')
    deplevel = fields.Char('請假人單位為一級或二級')
    admin = fields.Char()
    depkind = fields.Char('此部門是行政單位還是教學單位')
    istutor = fields.Char('是否為導師')
    formhours = fields.Char('應請幾時')
    compensate_reason = fields.Char('補休事由')
    form06_no = fields.Char('補休單號')
    form06_id = fields.Char('補休單流水號')
    baby_status = fields.Char('懷孕狀態(生產或流產)')
    issu_no = fields.Char()
    money = fields.Char('經費來源')
    option11 = fields.Char()
    option12 = fields.Char()
    worklocation = fields.Char()
    trafficmode = fields.Char()